package com.cos.hospital.ui.usercenter.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.cos.hospital.R;
import com.cos.hospital.model.bean.user.UserMsgBean;
import com.cos.hospital.tool.UTxt;

import java.util.List;

/**
 * @Description: 我的消息适配器
 * @Author: Kosmos
 * @Date: 2018年09月13日 20:52
 * @Email: KosmoSakura@foxmail.com
 */
public class MyMsgAdapter extends BaseQuickAdapter<UserMsgBean.MsgBean, BaseViewHolder> {

    public MyMsgAdapter(@Nullable List<UserMsgBean.MsgBean> data) {
        super(R.layout.item_user_msg, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, UserMsgBean.MsgBean item) {
        helper.setText(R.id.u_msg_time, UTxt.isNull(item.getFldMessageTime()));
//        helper.setText(R.id.u_msg_title, UTxt.isNull(item.getTitle()));
        helper.setText(R.id.u_msg_main, UTxt.isNull(item.getFldMessageContent()));
    }
}
